package com.htjc.integral.account.service.impl;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.htjc.integral.account.mapper.newdb.EcBpIncomeIntegralMapper;
import com.htjc.integral.account.mapper.newdb.EcBpOuterSystemparamMapper;
import com.htjc.integral.account.mapper.newdb.EcExtJfWsdlMapper;
import com.htjc.integral.account.service.IAccountCheckingService;
import com.htjc.integral.account.util.SoaClient;
import com.htjc.integral.account.util.UrlConfigUtil;
import com.htjc.integral.account.util.XflUtil;
import com.htjc.integral.account.util.XmlConverUtil;
import com.htjc.integral.account.util.enums.ProvinceCodeEnums;
import com.htjc.integral.account.util.enums.RedisKey;
import com.htjc.integral.common.util.RequestUtils;
import com.htjc.integral.model.account.EcBpOuterSystemparam;
import com.htjc.integral.model.conversion.EcExtJfWsdl;
import com.htjc.integral.model.newaccount.EcBpInComeIntegral;
import com.htjc.utils.http.HttpUtils;
import com.sgcc.http.proxy.client.security.RSAServer;

import lombok.extern.slf4j.Slf4j;
/**
 * 自建网省对账
 * @author Administrator
 *
 */
@Slf4j(topic = "jfLog")
@Service
public class AccountCheckingServiceImpl implements IAccountCheckingService{
	/** 积分收入表  */
	@Autowired
	private EcBpIncomeIntegralMapper incomeIntegralMapper;
	@Autowired
	private EcExtJfWsdlMapper wsdlMapper;
	@Autowired
	private EcBpOuterSystemparamMapper ecBpOuterSystemparamMapper;
	@Autowired
	private UrlConfigUtil urlConfigUtil;
	private  final SimpleDateFormat sdf0 = new SimpleDateFormat("yyyyMMdd");
	private  final SimpleDateFormat dateF = new SimpleDateFormat("yyyyMMdd");
	//	private  final SimpleDateFormat dateF1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
	//	private  final SimpleDateFormat dateF2 = new SimpleDateFormat("yyyyMMddhhmmss");
	/**
	 *   自建网省划转对账
	 * PROVINCE_CODE 网省  acct_status 对账状态
	 */
	@Override
	public void scoreConverAccDetailNewAll(Map<String, Object> params,List<Map<String, Object>> incomList) {
		//Calendar calendar = Calendar.getInstance();
		//calendar.setTime(new Date());
		//calendar.add(Calendar.DAY_OF_MONTH, -1);
		//String datS = sdf0.format(calendar.getTime())  + "000000";
		//String datE = sdf0.format(calendar.getTime())  + "235959";
		//params.put("starttime", datS);
		//params.put("endtime", datE);
		//params.put("acctstatus", "0");
		//List<Map<String, Object>> incomList=incomeIntegralMapper.selectPageDate(params);
		// TODO Auto-generated method stub
		System.out.println(incomList);
		listExcute(incomList, "330000");
	}

	//	public static void main(String[] args) {
	//		Calendar calendar = Calendar.getInstance();
	//		calendar.setTime(new Date());
	//		calendar.add(Calendar.DAY_OF_MONTH, -1);
	//		String datS = sdf0.format(calendar.getTime())  + "000000";
	//		String datE = sdf0.format(calendar.getTime())  + "235959";
	//		System.out.println("aaaaaaaaaaaaaaaa"+datS);
	//		System.out.println("aaaaaaaaaaaaaaaa"+datE);
	//	}

	private  void listExcute(List<Map<String, Object>> dataList,String provinceCode) {
		if (null != dataList && dataList.size() > 0) {
			int pointsDataLimit;
			Calendar calendar = Calendar.getInstance();
			calendar.setTime(new Date());
			calendar.add(Calendar.DAY_OF_MONTH, -1);
			String msg = null;
			if("330000".equals(provinceCode)||"33101".equals(provinceCode)) {
				pointsDataLimit = 100;
				msg="浙江对账";
			}else {
				pointsDataLimit = 1000;
			}

			Integer size = dataList.size();
			if (pointsDataLimit < size) {//判断是否有必要分批
				int part = size / pointsDataLimit;//分批数
				log.info(msg+"共有 ： " + size + "条，！" + " 分为 ：" + part + "批");
				for (int i = 0; i < part; i++) {
					List<Map<String, Object>> listPage = dataList.subList(0, pointsDataLimit);
					log.info(msg+"第" + (i + 1) + "次,执行处理:" + listPage);
					Map<String,List<Map<String,String>>> paramMap = new HashMap<String,List<Map<String,String>>>();
					List<Map<String,String>> generalParamList = new ArrayList<Map<String,String>>();
					Map<String,String> generalParamMap = new HashMap<String,String>();
					int sumNum=listPage.size();
					int sumScore=0;
					int sumCoin=0;
					Map<String, Object> map = new HashMap<String, Object>();
					List<Map<String,String>> retList = new ArrayList<Map<String,String>>();
					List<String> ids=new ArrayList<String>();
					for(int j=0;j<sumNum;j++) {
						sumScore+=Integer.parseInt(listPage.get(j).get("SOURCE_NUMBER").toString());
						sumCoin+=Integer.parseInt(listPage.get(j).get("INCOME_BALANCE").toString());

						map = listPage.get(j);
						Map<String,String> retMap = new HashMap<String,String>();
						String parId = map.get("ID") == null ? " " :map.get("ID").toString();
						retMap.put("id", map.get("INCOME_ID").toString());
						retMap.put("userName", map.get("ACCOUNT_NAME").toString() == null ? " " :map.get("ACCOUNT_NAME").toString());
						retMap.put("consNo", map.get("CONS_NO") == null ? " " :map.get("CONS_NO").toString());
						retMap.put("score", map.get("SOURCE_NUMBER") == null ? " " :map.get("SOURCE_NUMBER").toString());
						retMap.put("goldCoin", map.get("INCOME_BALANCE") == null ? " " :map.get("INCOME_BALANCE").toString());
						retMap.put("creatTime", map.get("CREATE_TIME") == null ? " " :map.get("CREATE_TIME").toString());
						retMap.put("createId", map.get("INCOME_ID") == null ? " " :map.get("INCOME_ID").toString());
						String dateString = null;
						SimpleDateFormat dateF2 = new SimpleDateFormat("yyyyMMddhhmmss");
						SimpleDateFormat dateF1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
						try {
							dateString = dateF1.format(dateF2.parse(map.get("CREATE_TIME").toString()));
						} catch (ParseException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}  

						retMap.put("convertTime", dateString == null ? " " :dateString);
						retMap.put("type", "03");
						retList.add(retMap);
						ids.add(map.get("INCOME_ID").toString());
						//						ids += StringUtils.isBlank(ids)?parId:"#" + parId;
					}
					log.info(msg+"第" + (i + 1) + "次,执行处理sumScore=" + sumScore);
					log.info(msg+"第" + (i + 1) + "次,执行处理sumCoin=" + sumCoin);
					generalParamMap.put("convertDate", dateF.format(calendar.getTime()));
					if(listPage.size() <=0){
						generalParamMap.put("sumNum", "0");
						generalParamMap.put("sumScore", "0");
						generalParamMap.put("sumCoin", "0");
					}else{
						generalParamMap.put("sumNum",String.valueOf(sumNum));
						generalParamMap.put("sumScore", String.valueOf(sumScore));
						generalParamMap.put("sumCoin", String.valueOf(sumCoin));
					}
					generalParamList.add(generalParamMap);
					paramMap.put("generalParamList", generalParamList);
					paramMap.put("detList", retList);
					dataList.subList(0, pointsDataLimit).clear();
					log.info("浙江网省推送数据"+sumNum+"：【" + paramMap + "】");
					try {
						scoreConverAccDetailNew(ids, paramMap,provinceCode);
					} catch (Exception e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
					paramMap.get("detList").clear();
					paramMap.get("generalParamList").clear();
				}
				if (!dataList.isEmpty()) {
					List<Map<String, Object>> listPage = dataList;
					log.info(msg+"最后一批数据,执行处理,执行处理:" + listPage);
					Map<String,List<Map<String,String>>> paramMap = new HashMap<String,List<Map<String,String>>>();
					List<Map<String,String>> generalParamList = new ArrayList<Map<String,String>>();
					Map<String,String> generalParamMap = new HashMap<String,String>();
					int sumNum=listPage.size();
					int sumScore=0;
					int sumCoin=0;
					Map<String, Object> map = new HashMap<String, Object>();
					List<Map<String,String>> retList = new ArrayList<Map<String,String>>();
					List<String> ids=new ArrayList<String>();
					for(int j=0;j<sumNum;j++) {
						sumScore+=Integer.parseInt(listPage.get(j).get("SOURCE_NUMBER").toString());
						sumCoin+=Integer.parseInt(listPage.get(j).get("INCOME_BALANCE").toString());

						map = listPage.get(j);
						Map<String,String> retMap = new HashMap<String,String>();
						String parId = map.get("ID") == null ? " " :map.get("ID").toString();
						retMap.put("id", map.get("INCOME_ID").toString());
						retMap.put("userName", map.get("ACCOUNT_NAME").toString() == null ? " " :map.get("ACCOUNT_NAME").toString());
						retMap.put("consNo", map.get("CONS_NO") == null ? " " :map.get("CONS_NO").toString());
						retMap.put("score", map.get("SOURCE_NUMBER") == null ? " " :map.get("SOURCE_NUMBER").toString());
						retMap.put("goldCoin", map.get("INCOME_BALANCE") == null ? " " :map.get("INCOME_BALANCE").toString());
						retMap.put("creatTime", map.get("CREATE_TIME") == null ? " " :map.get("CREATE_TIME").toString());
						retMap.put("createId", map.get("INCOME_ID") == null ? " " :map.get("INCOME_ID").toString());
						String dateString = null;
						SimpleDateFormat dateF2 = new SimpleDateFormat("yyyyMMddhhmmss");
						SimpleDateFormat dateF1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
						try {
							dateString = dateF1.format(dateF2.parse(map.get("CREATE_TIME").toString()));
						} catch (ParseException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}  

						retMap.put("convertTime", dateString == null ? " " :dateString);
						retMap.put("type", "03");
						retList.add(retMap);
						ids.add(map.get("INCOME_ID").toString());
						//						ids += StringUtils.isBlank(ids)?parId:"#" + parId;
					}
					log.info(msg+"最后一批数据,执行处理,执行处理sumScore=" + sumScore);
					log.info(msg+"最后一批数据,执行处理,执行处理sumCoin=" + sumCoin);
					generalParamMap.put("convertDate", dateF.format(calendar.getTime()));
					if(listPage.size() <=0){
						generalParamMap.put("sumNum", "0");
						generalParamMap.put("sumScore", "0");
						generalParamMap.put("sumCoin", "0");
					}else{
						generalParamMap.put("sumNum",String.valueOf(sumNum));
						generalParamMap.put("sumScore", String.valueOf(sumScore));
						generalParamMap.put("sumCoin", String.valueOf(sumCoin));
					}
					generalParamList.add(generalParamMap);
					paramMap.put("generalParamList", generalParamList);
					paramMap.put("detList", retList);
					dataList.clear();
					log.info("浙江网省推送数据"+sumNum+"：【" + paramMap + "】");
					try {
						scoreConverAccDetailNew(ids, paramMap,provinceCode);
					} catch (Exception e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
					paramMap.get("detList").clear();
					paramMap.get("generalParamList").clear();
					log.info(msg+"最后一批数据,执行处理:" + dataList);//表示最后剩下的数据
//					acctMain(listPage, msg, i, calendar);
				}
			} else {
				List<Map<String, Object>> listPage = dataList;
				log.info(msg+"不需要分批,执行处理:" + listPage);
				Map<String,List<Map<String,String>>> paramMap = new HashMap<String,List<Map<String,String>>>();
				List<Map<String,String>> generalParamList = new ArrayList<Map<String,String>>();
				Map<String,String> generalParamMap = new HashMap<String,String>();
				int sumNum=listPage.size();
				int sumScore=0;
				int sumCoin=0;
				Map<String, Object> map = new HashMap<String, Object>();
				List<Map<String,String>> retList = new ArrayList<Map<String,String>>();
				List<String> ids=new ArrayList<String>();
				for(int j=0;j<sumNum;j++) {
					sumScore+=Integer.parseInt(listPage.get(j).get("SOURCE_NUMBER").toString());
					sumCoin+=Integer.parseInt(listPage.get(j).get("INCOME_BALANCE").toString());

					map = listPage.get(j);
					Map<String,String> retMap = new HashMap<String,String>();
					String parId = map.get("ID") == null ? " " :map.get("ID").toString();
					retMap.put("id", map.get("INCOME_ID").toString());
					retMap.put("userName", map.get("ACCOUNT_NAME").toString() == null ? " " :map.get("ACCOUNT_NAME").toString());
					retMap.put("consNo", map.get("CONS_NO") == null ? " " :map.get("CONS_NO").toString());
					retMap.put("score", map.get("SOURCE_NUMBER") == null ? " " :map.get("SOURCE_NUMBER").toString());
					retMap.put("goldCoin", map.get("INCOME_BALANCE") == null ? " " :map.get("INCOME_BALANCE").toString());
					retMap.put("creatTime", map.get("CREATE_TIME") == null ? " " :map.get("CREATE_TIME").toString());
					retMap.put("createId", map.get("INCOME_ID") == null ? " " :map.get("INCOME_ID").toString());
					String dateString = null;
					SimpleDateFormat dateF2 = new SimpleDateFormat("yyyyMMddhhmmss");
					SimpleDateFormat dateF1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
					try {
						dateString = dateF1.format(dateF2.parse(map.get("CREATE_TIME").toString()));
					} catch (ParseException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}  

					retMap.put("convertTime", dateString == null ? " " :dateString);
					retMap.put("type", "03");
					retList.add(retMap);
					ids.add(map.get("INCOME_ID").toString());
					//						ids += StringUtils.isBlank(ids)?parId:"#" + parId;
				}
				log.info(msg+"不需要分批,执行处理:sumScore=" + sumScore);
				log.info(msg+"不需要分批,执行处理:sumCoin=" + sumCoin);
				generalParamMap.put("convertDate", dateF.format(calendar.getTime()));
				if(listPage.size() <=0){
					generalParamMap.put("sumNum", "0");
					generalParamMap.put("sumScore", "0");
					generalParamMap.put("sumCoin", "0");
				}else{
					generalParamMap.put("sumNum",String.valueOf(sumNum));
					generalParamMap.put("sumScore", String.valueOf(sumScore));
					generalParamMap.put("sumCoin", String.valueOf(sumCoin));
				}
				generalParamList.add(generalParamMap);
				paramMap.put("generalParamList", generalParamList);
				paramMap.put("detList", retList);
				dataList.clear();
				log.info("浙江网省推送数据"+sumNum+"：【" + paramMap + "】");
				try {
					scoreConverAccDetailNew(ids, paramMap,provinceCode);
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				paramMap.get("detList").clear();
				paramMap.get("generalParamList").clear();
				log.info(msg+"不需要分批,执行处理:" + dataList);
			}
		} else {

		}
	}

	/**
	 *  更新
	 * @param ids
	 * @return
	 */
	private int updataIncomeIntegral(List<String> ids) {
		return incomeIntegralMapper.updataIncomeIntegral(ids);

	} 
	/**
	 *  调用浙江对账
	 * @param consNos
	 * @param orgNos
	 * @param scores
	 * @param goldCoins
	 * @param convertTimes
	 * @param ids
	 * @param provinceNo
	 * @param total
	 * @param successTotal
	 * @param failTotal
	 * @param map
	 * @throws Exception
	 */
	private void scoreConverAccDetailNew(List<String> ids, Map<String, List<Map<String, String>>> map,String provinceNo) throws Exception {

		Map<String, Object> queryScoreConvert = this.scoreAccountCheckDetail(provinceNo, map);
		log.info("调用接口返回：【" + queryScoreConvert + "】。");
		if (queryScoreConvert != null && queryScoreConvert.size() != 0) {
			// 浙江网省 总笔数和总金额一致code：0，总笔数和总金额不一致：1,处理如果的rtnCode的返回值0表示成功，1表失败
			if ("330000".equals(provinceNo)) {
				if (queryScoreConvert.get("rtnCode") != null && "0".equals(queryScoreConvert.get("rtnCode").toString())) {
					updataIncomeIntegral(ids);
				}
			} else {
				if ("true".equals(queryScoreConvert.get("success")) && !"last".equals(queryScoreConvert.get("msg"))) {
					updataIncomeIntegral(ids);
				}
			}
			//log.info("【推送数据结束】--网省：【" + provinceNo + "】--总数：【" + total + "】--成功数：【" + successTotal + "】--失败数目：【" + failTotal + "】");

		} else {
			log.info("-------------------推送数据失败--------------");
			throw new RuntimeException();
		}
	}

	private Map<String, Object> scoreAccountCheckDetail(String provinceNo,Map<String,List<Map<String,String>>> map) {
		Map<String,Object> mReturn = new HashMap<String,Object>();
		String passPuterUrl=urlConfigUtil.getUrlByKey(RedisKey.URLCON_PREFIXX.getKey(), RedisKey.INTER_OUT_INVOKEQUERY.getKey());
		//强隔离穿透
		String INTER_ADDRESURL = urlConfigUtil.getUrlByKey(RedisKey.URLCON_PREFIXX.getKey(), RedisKey.INTER_ADDRESURL.getKey());
		EcExtJfWsdl jfWsdl = this.wsdlMapper.getJfWsdl("ZJ_"+provinceNo, "ZJ_JFDZMX");
		if(jfWsdl != null){
			log.info("scoreAccountCheckDetail接口请求配置信息："+jfWsdl.toString());
			String wsdlurl = jfWsdl.getWsdlAddress();//请求wsdlurl
			String wsdlHeader = jfWsdl.getZylzd1();//请求头
			String wsdlData=jfWsdl.getZylzd3();//请求报文拼装
			//请求WSDL
			log.info("********请求WebServicel...START："+new Date() +";");


			StringBuffer inputXml = new StringBuffer();
			//浙江的请求参数与别的网省不一样，单独处理
			if("330000".equals(provinceNo) && map != null){
				Map<String, String> generalParam = map.get("generalParamList").get(0);
				String convertDate = generalParam.get("convertDate");
				String sumNum = generalParam.get("sumNum");
				String sumScore = generalParam.get("sumScore");
				String sumCoin = generalParam.get("sumCoin");
				List<Map<String, String>> detList = map.get("detList");
				inputXml.append("<DBSET><R>")
				.append("<C N=\"srvCode\">").append("LSSP_000184").append("</C>")
				.append("<C N=\"channelCode\">").append("ESGCC").append("</C>")
				.append("<C N=\"orgNo\">").append("33101").append("</C>")
				.append("<C N=\"convertDate\">").append(convertDate).append("</C>")
				.append("<C N=\"sumNum\">").append(sumNum).append("</C>")
				.append("<C N=\"sumScore\">").append(sumScore).append("</C>")
				.append("<C N=\"sumCoin\">").append(sumCoin).append("</C>")
				.append("<C N=\"DETLIST\">").append("<DBSET>");
				for(Map<String, String> detMap:detList){
					inputXml.append("<R>")
					.append("<C N=\"id\">").append(detMap.get("id")).append("</C>")
					.append("<C N=\"userName\">").append(detMap.get("userName")).append("</C>")
					.append("<C N=\"consNo\">").append(detMap.get("consNo")).append("</C>")
					.append("<C N=\"score\">").append(detMap.get("score")).append("</C>")
					.append("<C N=\"goldCoin\">").append(detMap.get("goldCoin")).append("</C>")
					.append("<C N=\"creatTime\">").append(detMap.get("creatTime")).append("</C>")
					.append("<C N=\"createId\">").append(detMap.get("createId")).append("</C>")
					.append("<C N=\"convertTime\">").append(detMap.get("convertTime")).append("</C>")
					.append("<C N=\"type\">").append(detMap.get("type")).append("</C>")
					.append("</R>");
				}
				inputXml.append("</DBSET>").append("</C>").append("</R></DBSET>");
			}else{
				//				inputXml.append("<ORDER><servicecode>0202005</servicecode><source>esgcc</source><target>").append(orgNo)
				//				.append("</target>").append("<data><consList><consNo>").append(consNo).append("</consNo><orgNo>")
				//				.append(orgNo).append("</orgNo><score>").append(score).append("</score><goldCoin>").append(goldCoin)
				//				.append("</goldCoin><convertTime>").append(convertTime).append("</convertTime><id>").append(id)
				//				.append("</id></consList></data></ORDER>");
			}

			String input = "<![CDATA[?]]>".replace("?", inputXml);
			log.error("*********强隔离方法请求拼接的参数xml：" + input + ";");
			log.info("********强隔离方法请求拼接的参数getZylzd3：" + wsdlData + ";");
			String jsonData=wsdlData.replace("?", input).replace("*", wsdlurl);
			log.info("********强隔离方法请求拼接的参数data：" + jsonData + ";");
			//强隔离入参数据
			JSONObject wsdljson=new JSONObject();
			wsdljson.put("wsdurl", INTER_ADDRESURL);
			wsdljson.put("data", jsonData);
			//Map<String,String> retmap  = SoaClient.requestSoa(wsdlurl, wsdlHeader, input, "?", "", "UTF-8",jfWsdl.getZylzd2());
			String retmap = RequestUtils.sendPost(passPuterUrl, wsdljson.toJSONString());
			log.info("返回结果：【" + retmap.toString() + "】");
			if (StringUtils.isNotBlank(retmap)) {
				log.info("scoreAccountCheckDetail方法调用dxp后返回的结果：" + retmap);
				if ("330000".equals(provinceNo)) {// 浙江网省 总笔数和总金额一致：0，总笔数和总金额不一致：1
					try {
						String result = SoaClient.subStringForContent(retmap.toString(), jfWsdl.getZylzd2());
						List<Map> listr = XflUtil.toList("<DBSET><R>" + result + "</R></DBSET>");
						if (listr.size() > 0) {
							mReturn = listr.get(0);
						}
					} catch (Exception e) {
						log.info("", e);
					}
				} else {
					mReturn = XmlConverUtil.ResultXmltoMap(retmap);
				}
			}
		}else{

			//			consNo = RSAServer.rsaEncryption(consNo);
			//			orgNo = RSAServer.rsaEncryption(orgNo);
			//			score = RSAServer.rsaEncryption(score);
			//			goldCoin = RSAServer.rsaEncryption(goldCoin);
			//			convertTime = RSAServer.rsaEncryption(convertTime);
			//			id = RSAServer.rsaEncryption(id);
			//			provinceNo= RSAServer.rsaEncryption(provinceNo);
			//			total= RSAServer.rsaEncryption(total);
			//			successTotal = RSAServer.rsaEncryption(successTotal);
			//			failTotal = RSAServer.rsaEncryption(failTotal);
			//			//String url = SgccUtils.getConfValue("csups.95598.scoreAccountCheckDetail.request.url");
			//			EcBpOuterSystemparam urlAddModel = ecBpOuterSystemparamMapper.selectByPrimaryParamcode("csups.95598.scoreAccountCheckDetail.request.url");
			//			String url = urlAddModel.getParamvalue();
			//			//		String url = "http://210.77.179.14:7016/CSUPS/95598/weixin/scoreAccountCheckDetail";
			//			if(StringUtils.isBlank(total)&&(StringUtils.isBlank(consNo)||StringUtils.isBlank(orgNo)
			//					||StringUtils.isBlank(score)||StringUtils.isBlank(goldCoin)
			//					||StringUtils.isBlank(convertTime)||StringUtils.isBlank(id))){
			//				//			logger.error("total=%s,consNo=%s,orgNo=%s,score=%s,goldCoin=%s,convertTime=%s,id=%s",
			//				//					total,consNo,orgNo,score,goldCoin,convertTime,id);
			//				return null;
			//			}
			//			LinkedHashMap<String, String> reqParams = new LinkedHashMap<String, String>();
			//			reqParams.put("consNo", consNo);
			//			reqParams.put("orgNo", orgNo);
			//			reqParams.put("score", score);
			//			reqParams.put("goldCoin", goldCoin);
			//			reqParams.put("id", id);
			//			reqParams.put("convertTime", convertTime);
			//			reqParams.put("provinceNo", provinceNo);
			//			reqParams.put("total", total);
			//			reqParams.put("success_total", successTotal);
			//			reqParams.put("fail_total", failTotal);
			//			log.info(url);
			//			String requestData = HttpUtils.sendHttpPost(url, reqParams.toString());
			//			log.info("积分转换对账明细接口出错："+requestData);
			//			JSONObject json = (JSONObject) JSONSerializer.toJSON(requestData);
			//			mReturn = JsonUtil.getInstance().json2Map(json);
		}
		log.info("bsc中scoreAccountCheckDetail方法处理后返回结果map:" + mReturn.toString());
		return mReturn;
	}


}
